package com.infobie.android.pocketdhamma.dhammapada;

import com.infobie.android.pocketdhamma.R;

import android.app.AlertDialog;
import android.app.Dialog;
import android.content.Context;
import android.graphics.Color;
import android.webkit.WebView;
import android.widget.TextView;

public class Alerts {
	static public void Show(Context con, String title, String message) {
		Dialog diag=new Dialog(con);
		diag.setTitle(title);
		TextView txt = new TextView(con);
		txt.setTextColor(Color.WHITE);
		txt.setText(message);
		diag.setContentView(txt);
		diag.show();
	}
	
	static public void ShowAbout(Context con) {
		WebView wv = new WebView(con);
    	String sAbout = con.getString(R.string.about_dhammapada);
    	sAbout = sAbout + "<br><br>" +  con.getString(R.string.about_content);
    	sAbout = sAbout + "<br><br>" +  con.getString(R.string.about_termsofuse);
    	sAbout = sAbout + "<br><br>" +  con.getString(R.string.about_development);
    	sAbout = sAbout + "<br><br>" +  con.getString(R.string.about_developer);
    	sAbout = sAbout + "<br><br>" +  con.getString(R.string.about_ackowledgement);
        wv.loadData(sAbout, "text/html", "UTF-8");
        AlertDialog.Builder builder = new AlertDialog.Builder(con).setView(wv).setTitle("About...");
        AlertDialog dialog = builder.create();
        dialog.show();
	}
}
